<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>nextTick</title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="app">
    <h1>{{title}}</h1>
  </div>
  <script>
    new Vue({
      el: '#app',
      data: {
        title: 'hello Vue'
      },
      async mounted() {
        this.title = 'hello vue !!!'
        // this.$nextTick(() => {
        //   console.log(document.querySelector('h1').innerHTML)
        // })
        await this.$nextTick()
        console.log(document.querySelector('h1').innerHTML)
      },
    })
  </script>
</body>
</html>